package com.lcf.app.rabbitmq.consumer.listener;

import com.lcf.common.model.MqConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author ChenFei
 * @date 2021/12/2
 */
@Slf4j
@Component
public class FanoutReceiverListener {

    @RabbitListener(queues = MqConstant.FANOUT_QUEUE_ONE)
    public void fanoutOne(String message){
        log.info("fanoutOne : {}",message);
    }

    @RabbitListener(queues = MqConstant.FANOUT_QUEUE_TWO)
    public void fanoutTwo(String message){
        log.info("fanoutTwo : {}",message);
    }

}
